<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-body">
				<form ng-submit="searchRe()" class="form-horizontal">
                   	<div class="form-group">
                   		<div class="col-sm-2">
                   			<input type="text" class="form-control" placeholder="请输入功能名称" ng-model="param.funcName">
                       	</div>
                        <div class="col-sm-2">
                            <select class="form-control" ng-model="param.source" style="color: black"
                                    id="source" name="source" >
                                <option value="">--渠道名称--</option>
                                <option value="lbjr">联璧金融</option>
                                <option value="lbn">习之老板娘</option>
                                <option value="ld">习之铃铛</option>
                                <option value="zqh">智仟汇</option>
                                <option value="hyz">驿站精选</option>
                            </select>
                        </div>
                       	<div class="col-md-1">
                            <label class="col-sm-1 control-label"><button class="ifc-btn btn-primary" type="submit">查 询</button></label>
                        </div>
                        <div class="col-md-1">
                            <label class="col-sm-1 control-label"><button class="ifc-btn btn-dark" type="button" ng-click="clearSearch()">重  置</button></label>
                        </div>
                   	</div>
				</form>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>功能编号</th>
                        <th>功能名称</th>
                        <th>渠道编号</th>
                        <th>渠道名称</th>
                        <th>跳转标识</th>
                        <th>Android_Url</th>
                        <th>IOS_Url</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.records">
                        <td class="v-middle">{{$index + 1}}</td>
                        <td class="v-middle">{{item.funcNo}}</td>
                        <td class="v-middle">{{item.funcName}}</td>
                        <td class="v-middle">{{item.channelNo}}</td>
                        <td class="v-middle">{{item.channelName}}</td>
                        <td class="v-middle">
                        	<span ng-if="item.requestFlag==0">不跳转</span>
                            <span ng-if="item.requestFlag==1">原生页</span>
                            <span ng-if="item.requestFlag==2">H5</span>
                            <span ng-if="item.requestFlag==3">打开app</span>
                            <span ng-if="item.requestFlag==4">客服</span>
                        </td>
                        <td class="v-middle" title="{{item.requestUrl}}">{{item.requestUrl | limitTo:25}}</td>
                        <td class="v-middle" title="{{item.iosRequestUrl}}">{{item.iosRequestUrl | limitTo:25}}</td>
                        <td class="v-middle">
                        	<span ng-if="item.enable=='Y'">启用</span>
                            <span ng-if="item.enable=='N'">禁用</span>
                        </td>
                        <td class="v-middle">
                            <button type="button" ng-if="item.enable=='Y'" ng-click="enableFunc(item.funcNo,'N')" class="btn btn-sm btn-default m-l-xs">
                                <i class="fa fa-ban m-r-xs text-sm"></i>停用</button>
                                
                            <button type="button" ng-if="item.enable=='N'" ng-click="enableFunc(item.funcNo,'Y')" class="btn btn-sm btn-default m-l-xs">
                                <i class="fa fa-check m-r-xs text-sm"></i>启用</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div>
    </div>
</div>